package com.hanhai.material.device.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.RelationOneToMany;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 *  实体类。
 *
 * @author youchuang
 * @since 2024/01/30 14:06:26
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "sys_product_record_detention",dataSource = "device")
public class SysProductRecordDetention implements Serializable {

    @Id
    private String id;

    private Date productDate;

    private String workPlanId;

    private String productId;

    private String productName;

    private String shortName;

    private Integer totalCount;

    private Integer goodNum;

    private Integer badNum;

    @Column(onInsertValue = "now()")
    private Date createTime;

    @Column(onUpdateValue = "now()")
    private Date updateTime;

    private  String type;

    private Integer status;

    private boolean result;

    private String productRecordId;

    private Integer num;

    private Integer nowNum;

    private String reason;

    private String machineName;

    private String shift;

    private String createUserName;

    private String createUserId;

    private String updateUserName;

    private String updateUserId;

    @Column(ignore = true)
    SysProductRecordDetentionRecord productRecordDetentionRecord;

    private Integer totalNum;

    @Column(ignore = true)
    private Date startDate;
    @Column(ignore = true)
    private Date endDate;

    @Column(ignore = true)
    private List<SysProductRecordDetention> children;
    @Column(ignore = true)
    private Integer orderNumber;

    @Column(ignore = true)
    private boolean isAdd;

    @Column(ignore = true)
    private boolean isEdit;

    @Column(ignore=true)
    private boolean isFirst;

    @Column(ignore = true)
    private Integer parentIndex;

    @Column(ignore = true)
    private boolean dataType;

    @Column(ignore = true)
    private Integer handleTotal;
    @Column(ignore = true)
    private String name;

    private String machineArea;

    private String groupName;

    private String lineManager;
    private  String line;


    @RelationOneToMany(selfField = "id",targetField = "productRecordDetentionId")
    List<SysProductRecordDetentionRecord> productRecordDetentionRecordList;


}
